<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>数据详细</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		/* function dataForm(tableId){
			var url = "${ctx}/ins/insData/fill?table.id="+tableId;
			top.$.jBox.open("iframe:"+url, "数据填报",810,$(top.document).height()-120,{
                buttons:{"提交":"ok", "关闭":true}, bottomText:"数据填报",submit:function(v, h, f){
                    var code;
                    if (v=="ok"){
                    	// 执行保存
                        //loading('正在提交，请稍等...');
                    	var flag = h.find("iframe")[0].contentWindow.submitForm();
                    	if(flag){
                    		location.reload();
                    	}
                        return false;
                    }
                }, loaded:function(h){
                    $(".jbox-content", top.document).css("overflow-y","hidden");
                }
            });
		} */
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ins/insData/view">数据详细</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="insTable" action="${ctx}/ins/insData/view" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>主名称：</label>
				<form:input path="name" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>次名称：</label>
				<form:input path="fullName" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>分类：</label>
				<sys:treeselect id="parent" name="category.id" value="${insTable.category.id}" labelName="category.name" labelValue="${insTable.category.name}"
					title="父级分类" url="/ins/insCategory/treeData" extId="${category.id}" cssClass="" allowClear="true"/>
			</li>
			<%-- <li><label>创建日期：</label>
				<input name="createDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${insTable.createDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li> --%>
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>主名称</th>
				<th>次名称</th>
				<th>分类</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="insTable">
			<tr>
				<td>
					<a href="${ctx}/ins/insData/dataList?table.id=${insTable.id}">${insTable.name}</a>
				</td>
				<td>
					${insTable.fullName}
				</td>
				<td>
					${insTable.category.name}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>